package com.gen.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zzx.dao.IGoodsDao;
import com.zzx.entity.Goods;

@Service
public class GoodsServiceImpl implements IGoodsService{
	@Autowired
	private IGoodsDao goodsDao;

	public IGoodsDao getGoodsDao() {
		return goodsDao;
	}

	public void setGoodsDao(IGoodsDao goodsDao) {
		this.goodsDao = goodsDao;
	}

	@Override
	public int insertGoodsToGoods(Goods goods) {
		return goodsDao.insertGoodsToGoods(goods);
	}

	@Override
	public int deleteGoodsByPid(Integer pid) {
		return goodsDao.deleteGoodsByPid(pid);
	}

	@Override
	public int updateGoodsToGoods(Goods goods) {
		return goodsDao.updateGoodsToGoods(goods);
	}

	@Override
	public Goods selectGoodByPid(Integer pid) {
		return goodsDao.selectGoodByPid(pid);
	}

	@Override
	public List<Goods> selectGoodsByParam(Goods goods) {
		return goodsDao.selectGoodsByParam(goods);
	}

	@Override
	public List<Goods> selectGoodsByStatus(Integer status, Map<String, Integer> map) {
		return goodsDao.selectGoodsByStatus(status, map);
	}

	@Override
	public List<Goods> selectAllGoods() {
		return goodsDao.selectAllGoods();
	}

	@Override
	public int selectGoodsCount() {
		return goodsDao.selectGoodsCount();
	}

	@Override
	public Map<String, Integer> selectGoodsCountsByKid(List<Object> kids) {
		return goodsDao.selectGoodsCountsByKid(kids);
	}
	
}
